// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Fluent;
using Elastic.Clients.Elasticsearch.Requests;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport;
using Elastic.Transport.Extensions;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.LicenseManagement;

public sealed partial class PostStartTrialRequestParameters : RequestParameters
{
	/// <summary>
	/// <para>
	/// whether the user has acknowledged acknowledge messages (default: false)
	/// </para>
	/// </summary>
	public bool? Acknowledge { get => Q<bool?>("acknowledge"); set => Q("acknowledge", value); }
	public string? TypeQueryString { get => Q<string?>("type_query_string"); set => Q("type_query_string", value); }
}

/// <summary>
/// <para>
/// The start trial API enables you to start a 30-day trial, which gives access to all subscription features.
/// </para>
/// </summary>
public sealed partial class PostStartTrialRequest : PlainRequest<PostStartTrialRequestParameters>
{
	internal override ApiUrls ApiUrls => ApiUrlLookup.LicenseManagementPostStartTrial;

	protected override HttpMethod StaticHttpMethod => HttpMethod.POST;

	internal override bool SupportsBody => false;

	internal override string OperationName => "license.post_start_trial";

	/// <summary>
	/// <para>
	/// whether the user has acknowledged acknowledge messages (default: false)
	/// </para>
	/// </summary>
	[JsonIgnore]
	public bool? Acknowledge { get => Q<bool?>("acknowledge"); set => Q("acknowledge", value); }
	[JsonIgnore]
	public string? TypeQueryString { get => Q<string?>("type_query_string"); set => Q("type_query_string", value); }
}

/// <summary>
/// <para>
/// The start trial API enables you to start a 30-day trial, which gives access to all subscription features.
/// </para>
/// </summary>
public sealed partial class PostStartTrialRequestDescriptor : RequestDescriptor<PostStartTrialRequestDescriptor, PostStartTrialRequestParameters>
{
	internal PostStartTrialRequestDescriptor(Action<PostStartTrialRequestDescriptor> configure) => configure.Invoke(this);

	public PostStartTrialRequestDescriptor()
	{
	}

	internal override ApiUrls ApiUrls => ApiUrlLookup.LicenseManagementPostStartTrial;

	protected override HttpMethod StaticHttpMethod => HttpMethod.POST;

	internal override bool SupportsBody => false;

	internal override string OperationName => "license.post_start_trial";

	public PostStartTrialRequestDescriptor Acknowledge(bool? acknowledge = true) => Qs("acknowledge", acknowledge);
	public PostStartTrialRequestDescriptor TypeQueryString(string? typeQueryString) => Qs("type_query_string", typeQueryString);

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
	}
}